home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
art&graf.ix
/
art-3488
/
macros
/
amixtbm.aim
< prev
next >
Wrap
Text File
|
1991-01-13
|
2KB
|
48 lines
* Benchmark "amixtbm": a mixture of binary, grey-value and
* display operations, using the images "trui" and "cermet"
* (loading the images should not be included in the timing).
* The display is switched "on" and "off", showing the result
* of the operations when necessary.
don
read trui A * Image "trui" in A and
read cermet B * "cermet" in B,
clear C * clear windows C
clear D * and D.
* start here the benchmark timing!
* some binary/morphologic operations upon "cermet"
doff
thr B B 1 * threshold
don
inv 1 B * invert bitplane
doff
bcopy 1 1 B C
propag 255 2 1 8 1 C * propagate the edge in bitplane 2
don
exor 1,2,1,C * remove objects connected to the edge
doff
bcopy 1 2 C C * make a mask bitplane
ero 3 1 6 0 C * remove small objects
don
propag 100 1 2 6 0 C * propagate remaining objects
label C D 1 8 * "label" the objects
* some grey-value operations upon "trui"
don 2 * contrast stretching active
gdisp A * redisplay trui
gradx A B * horizontal gradient image
grady A C * vertical gradient image
lapl A D * enhance the image
doff
* max/min/arithmetic grey-value operations upon "trui"
lmax A B 7 * maximum
lmin A C 7 * minimum
lmin B D 7 * lohull
add C B * dynamic threshold, low freq
lmax C C 7 * uphull
add C D * midian
sub A D 127 * orig-midian, hf non-edges
don 2 * contrast stretching active
copy D C
mul A C * "mix" with original
don * back to default display mode.